<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>管理动态</title>
    <?php PrintPageHead(); ?>
    <link href="../resource/css/hermes.css" rel="stylesheet">
    <link href="../resource/js/calendar/calendar-blue.css" type="text/css" rel="stylesheet">
    <script src="../resource/js/calendar/calendar.js" type="text/javascript"></script>
    <script src="../resource/js/hermes.js"></script>
    <style type="text/css">
        .divleft{width: 15%; float: left; text-align:left; border-right: solid 1px #d5d5d5; margin-right: 2% }
        .divcenter{width: 46%; float: left; text-align:left; border-right: solid 1px #d5d5d5; margin-right: 2%}

        .divright{ width: 15%; float: left; text-align:left;  margin-right: 2%}
        .position {
            position: absolute;
            display: none;
            z-index: 15;
            width: 400px;
            height: 40px;
            margin: -20px 0 0 -75px;
            padding: 0 10px;
            background: #eee;
            line-height: 2.4;
            cursor:pointer;
        }
    </style>
    <?php
    if (!array_key_exists("公众号ID",$_SESSION)) {
        header("Location:back.php");
    }
    pdo()->beginTransaction();
    $bm=new C后台管理员();
    $act = $_GET['act']==''?1:$_GET['act'];

    $评论 = 'back.php?state=back11DongTai_PingLun';

    $Get群列表=$bm->Get个人动态($_GET['page'],$_GET,$_POST['keywords']);

    ?>
</head>
<body>


<div class="container-fluid">
    <?php include_once 'back_header.php'; ?>
    <div class="panel panel-primary">
        <div class="panel-heading text-center"><h3 class="panel-title">管理动态</h3></div>
        <div class="panel-body" style="text-align:center">
            <div style="margin: 0 0 10px 0;text-align:left">
                <form action="" method="post">
                    <b style="color:#3c763d;font-size: 16px;">内容</b> <input type="text" name="keywords" value="<?=$_POST['keywords']?>">&nbsp;&nbsp;
                    <button type="submit"  class="btn btn-default btn-success ">&nbsp;查 询&nbsp;</button></form></div>
            <div class="panel-group"  id="accordion" role="tablist" aria-multiselectable="true">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="row" style="">
                          <div class="divleft">
                                用户
                            </div>
                            <div class="divcenter">
                                内容
                            </div>
                           
                            <div class="divleft">
                                时间
                            </div>
                           
                            <div class="divright" style="text-align:center">
                                操作
                            </div>
                        </div>
                    </div>
                </div>
                <?php foreach($Get群列表['result'] as $v){?>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="row" style="">
                                <div class="divleft">
                                    <b style="color:#3c763d;font-size: 16px;">姓名:</b><?=$v['name']?><br>
                                    <b style="color:#3c763d;font-size: 16px;">医院:</b> <?=$v['医院']?>
                                </div>
                                <div class="divcenter">
                                    <?php echo $v['内容'];
                                    echo "<br>";
                                    if($v['图片']){
                                        $图片 = explode(";;",$v['图片']);

                                        foreach($图片 as $显示){
                                            echo "<img onclick='fs显示个人动态(\"../cache/dongtai_img/".$显示."\")' style='height:50px' src='../cache/dongtai_img/".$显示."'>";
                                        }
                                    }
                                    ?>

                                </div>
                                <div class="divleft">
                                    <?=$v['发表时间']."&nbsp;   " ; ?>
                                </div>

                                <div class="divright" style="text-align:center">
                                    <a href="<?= $评论 ?>&id=<?=$v['id']?>">查看评论</a>

                                    <input type="button" onclick="f删除个人动态(<?=$v['id']?>)" value="删除">
                                </div>
                            </div>
                        </div>
                    </div>
                <?php }
                if(!$Get群列表['result']){
                ?>
                <div class="panel-heading text-center"><h3 class="panel-title">没有数据 !!!</h3></div>
                <?php }?>
            </div>
            <?=$Get群列表['show']?>
        </div>
        <div class="ewm-edit" id="show_ewm" style="width:90%;height:100%;position:fixed;z-index: 60; display: none; top: 0;">
            <div class="ewm-bg" style="background-color: #000;width:100%;opacity:0.5;height:100%;position:fixed;top:50px;left:0;"></div>
            <div class="ewm-img" style="position:relative;top:100px;width:auto;height:auto;margin:0 auto;background:#fff;overflow:hidden;border-radius:8px;">
                <div id="close" style="position:absolute;top:5px;font-size:150%;color:#333;height:20px;width:20px;right:5px;line-height: 18px;text-align: center;" onclick="closeewm()">&times;</div>

                <div id="show_erweim" style="text-align:center;margin:40px;"></div>
            </div>
        </div>
    </div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="../resource/js/jquery-1.11.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="../resource/js/bootstrap.min.js"></script>

</body>
</html>
<script language="JavaScript">
    function fs显示个人动态($url){
        $('#show_ewm').show();
        var  显示 ='<img  src="'+$url+'">';
        $('#show_erweim').html(显示);

    }
    function closeewm(){
        $("#show_ewm").hide();
    }
    function f删除个人动态(动态id){

        $.post('BackSellerAjax.php',{id:动态id,'businessFlag':'删除个人动态'},function(data) {
            if(data){
                alert("删除个人动态成功");
                location.replace(location.href='');

            }else {
                alert("删除个人动态失败");
            }


        })
    }
</script>